#ifndef PORTAL_SUBJECT_H
#define PORTAL_SUBJECT_H

#include <vector>

class Portal;
class PortalListener;

class PortalSubject
{
public:
    virtual ~PortalSubject();

    PortalSubject& operator=(const PortalSubject& rhs);

    virtual void registerListener(PortalListener* listener);
    virtual void unregisterListener(PortalListener* listener);
protected:
    virtual void notifyListeners(const Portal& hit);

    typedef std::vector<PortalListener*> listener_vec;
    typedef listener_vec::iterator listener_it;

    listener_vec listeners;
};

#endif